import requests
import execjs


headers = {
    "Cookie": "sessionid=z6vaj6efnn6k38udtl8gf74z36zfq6qr",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
}
params = {
    "page": "",
    "m": ""
}
s = 0
times = 0
js_compile = execjs.compile(open("jscode.js", encoding="utf-8").read())
for i in range(1, 6):
    url = "https://match.yuanrenxue.cn/api/match/1"
    m = js_compile.call("run")
    params["page"] = i
    params["m"] = m
    response = requests.get(url, headers=headers, params=params)
    json_data = response.json()
    s += sum([i.get("value") for i in json_data.get("data")])
    times += len(json_data.get("data"))
result = s // times
print(result)